package com.guigu.qingcheng.orderservice.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.guigu.qingcheng.pojo.order.TbOrder;
import com.guigu.qingcheng.utils.R;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author testjava
 * @since 2020-07-08
 */
public interface TbOrderService extends IService<TbOrder> {

    public List<TbOrder> findOrderByUsername(String username);

    //高级分页查询
    R findPage (@RequestParam("page") Integer page, @RequestParam("size") Integer size, @RequestBody Map<String,Object> searchMap );

    /**
     * 多条件查询
     * @param ids
     * @return
     */
    R findById(String ids);

    /**
     * 批量发货
     * @param tbOrders
     * @return
     */
    R updates(List<TbOrder> tbOrders);

    /**
     * 批量关闭订单
     * @param tbOrders
     * @return
     */
    R updatedown(List<TbOrder> tbOrders);

    /**
     * 批量删除订单
     * @param tbOrders
     * @return
     */
    R updateDelete(List<TbOrder> tbOrders);

    /**
     * 每两分钟将未付款的订单给关闭
     */
    void orderTimeOutLogic();

    R updateqrsh(TbOrder tbOrder);

    R yjupdateqrsh(List<TbOrder> tbOrders);

    R findByConsignStatus();

    R hbOrder(String id, String id1);

    R updateOrder(TbOrder tbOrder,String remarks);

    void orderTimeOutSh();

    R findByOrderId(String id);

    Map<String, Object> add(TbOrder order);

}
